<?php
class M_CruiseType extends Apps_Db_Table_Abstract {
	protected $_name = 'cruise_type';

	const STATUS_ACTIVE 	= 1;
	const STATUS_INACTIVE 	= 0;
	const STATUS_DELETED 	= -1;

	//LIST
	public function getList () {
		$q = $this->_db
				  ->select()
				  ->from($this->_name, null)
				  ->where('status =?', self::STATUS_ACTIVE)
				  ->columns(array('id' => 'id'));

		if($this->getLang() == 'en') {
		    $q->columns(array('cruise_type_title' => 'cruise_type.en_title'));
		} else $q->columns(array('cruise_type_title' => 'cruise_type.title'));

 		return $q;
	}
}